import { ref, computed } from "vue";
import { defineStore } from "pinia";

export const useAdminStore = defineStore(
  "Admin",
  () => {
    const adminInfo = ref({});
    const isLogin = ref(false);
    const token = ref("");

    return { adminInfo, isLogin, token };
  },
  {
    persist: {
      enabled: true,
      strategies: [
        {
          key: "admin",
          storage: localStorage,
        },
      ],
    },
  }
);
